/**
 * Created by george on 16/4/9.
 */
var config = require("./webpack._entry");
var webpack = require("webpack");

module.exports = {
  entry: config.entry,
  output: config.output,
  module: {
    loaders: [
      // { test: /\.css$/, loader: 'style-loader!css-loader' },
      {
        test: /\.js[x]?$/, exclude: /node_modules/, loader: 'babel-loader',
        query: {
          presets: ['es2015', 'react'],
          plugins: [
            "transform-class-properties",
            "transform-es3-property-literals",
            "transform-member-expression-literals"
          ]
        }
      }
    ]
  },
  plugins: [
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false,
        drop_console: true
      }
    }),
    new webpack.DefinePlugin({
      "process.env": {
        NODE_ENV: JSON.stringify("production")
      }
    })
  ]
};
